#!/usr/bin/env python3

import rospy
from DrEmpower_can.msg import set_angle_range
# import DrEmpower as dr

def callback(data):
    import DrEmpower as dr
    dr.set_angle_range(id_num=data.id_num, angle_min=data.angle_min, angle_max=data.angle_max)
    rospy.loginfo("set_angle_range_node")


def listener():
    rospy.init_node("set_angle_range", anonymous=True)
    rospy.Subscriber("set_angle_range", set_angle_range, callback)
    rospy.spin()


if __name__ == '__main__':
    listener()

